Source : https://cancel.fm/blog/2019-11/language-fragility/

Programming Language Fragility

Suggestions and corrections: cancel@cancel.fm


How fragile are the products of programming languages? If you write some software in a particular language, can you copy the compiled program to another computer and expect it to work? If the internet stopped functioning, would you be left helpless?

LanguagePortable by DefaultPortable with EffortNotes
CNo (libc)OK
C++No (libc)OK
RustNo (libc)OKRequires no_std. Most of the Rust ecosystem will be unusable.
GoOKOK
Pascal (fpc & Delphi)OKOK
ZigOKOK
NimOKOK
OdinNo (libc)OK
DNo (libc)Partial (static libc)On Linux, musl may be statically linked instead of glibc.
HaskellNo (libc)Partial (static libc)Complex build process to statically link runtime libc. Must avoid using libgmp features.
OCamlNo (libc)Partial (static libc)Complex build process to statically link runtime libc. Win32 requires cygwin.
SwiftNo (no Win32)No (no Win32)
JavaNo (complex runtime)No (fragile bundling)Complex and fragile bundling of a separate runtime (with licensing issues)
C#/F#/.NETNo (complex runtime)No (fragile bundling)Complex and fragile bundling of a separate runtime (with licensing issues)
PythonNo (complex runtime)No (fragile bundling)Complex and fragile bundling of a separate runtime
RubyNo (complex runtime)No (fragile bundling)Complex and fragile bundling of a separate runtime
PerlNo (complex runtime)No (fragile bundling)Complex and fragile bundling of a separate runtime
JavaScript (Node.js)No (complex runtime)No (fragile bundling)Complex and fragile bundling of a separate runtime
Scheme (Racket)No (complex runtime)No (fragile bundling)Complex and fragile bundling of a separate runtime (with licensing issues)
LuaNo (custom binary)Partial (custom binary)Must build custom binary of the runtime plus your program code bundled together.
TclNo (complex runtime)Partial (custom binary)Must build custom binary of the runtime plus your program code bundled together.

What about the compilers themselves? How likely is something to go wrong when acquiring or setting up a compiler?

Compiler/InterpreterPortableNotes
gccNoRequires installer or package manager. Heavy environment entanglement. Multiple executables.
clangNoRequires installer or package manager. Heavy environment entanglement. Multiple executables.
msvcNoRequires installer. Heavy environment entanglement. Multiple executables.
tccOK
RustNoRequires installer or package manager. Recommended installation method is to pipe curl into bash.
GoOK
Free PascalNoRequires installer or package manager.
DelphiNoRequires installer.
ZigOK
NimNoRequires a C compiler.
OdinOK
DPartialMultiple executables. Some environment entanglement. No installer required.
HaskellNoRequires installer or package manager.
OCamlNoRequires installer or package manager. Requires cygwin on Win32.
SwiftNoRequires installer. Heavy environment entanglement. Mac only.
JavaNoRequires installer or package manager. Multiple executables. Licensing issues.
C#/F#/.NETNoRequires installer or package manager. Multiple executables. (Mono, .NET, and .NET Core)
PythonNoRequires installer or package manager. Heavy environment entanglement. Multiple executables.
RubyNoRequires installer or package manager.
PerlNoRequires installer or package manager. Heavy environment entanglement.
JavaScript (Node.js)NoRequires installer or package manager.
Scheme (Racket)NoRequires installer or package manager.
LuaOKRolling your own host executable is required.
TclOKFully portable via tclkits/all-in-one binaries.

Bonus round: portable compilers that can build themselves, portably.

Compiler/InterpreterBuilds Itself PortablyNotes
tccOKWhen using musl-libc. No Win32.
GoOK
Everything elseNo

P.S. I’ve been working on some indie shareware: if you use Slack but don’t like the default browser-based client, give Ripcord a try.

Ripcord
Screenshot of the main Ripcord window with light theme
(+)